package com.IoLiu;

import java.io.*;

public class CopyNo {
    public static void main(String[] args) throws IOException {
        copyNo();
    }

    private static void copyNo() throws IOException {
        System.out.println("开始复制了");
        InputStreamReader isr=new InputStreamReader(new
                FileInputStream("D:\\下载\\file\\file1\\CopyJava.java"),"GBK");
        OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream
                ("D:\\下载\\file\\file1\\copy.java",true),"GBK");
        char[] ch=new char[1024];
        int len;
        while((len=isr.read(ch))!=-1){
            osw.write(ch,0,len);
        }
    }
}
